﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

using SMG.Domain.Model.Program;


namespace Infrastructure.Repository.EntityFramework.Program
{
    public class DeviceConfiguration : EntityTypeConfiguration<Device>
    {
        public DeviceConfiguration()
        {
            ToTable("Tab_Devices");
            HasKey<long>(p => p.ID);
            Property(p => p.ID).HasColumnName("id");
            Property(p => p.DeviceId).HasColumnName("device_id");
            Property(p => p.DeviceName).HasColumnName("device_name");
            Property(p => p.DeviceMode).HasColumnName("device_mode");
            Property(p => p.DeviceVender).HasColumnName("device_vendor");
            Property(p => p.DeviceIP).HasColumnName("device_ip");
            Property(p => p.DevicePort).HasColumnName("device_port");
            Property(p => p.DeviceDesc).HasColumnName("device_desc");
            Property(p => p.MountAccount).HasColumnName("mount_acc");
            Property(p => p.MountPwd).HasColumnName("mount_pwd");
            Property(p => p.MountPath).HasColumnName("path");
            Property(p => p.VideoMode).HasColumnName("videoformat");
        }
    }
}
